package com.yunfeisoft.base.model;

import com.yunfeisoft.common.base.BaseModel;
import com.yunfeisoft.common.sql.record.TransientField;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * ClassName: WorkflowHistory
 * Description: 流程实例执行历史
 *
 * @Author: Jackie liu
 * Date: 2020-01-03
 */
@Entity
@Table(name = "TS_WORKFLOW_HISTORY")
public class WorkflowHistory extends BaseModel implements Serializable {

    /**
     * Field serialVersionUID: 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
     * 流程实例id
     */
    @Column
    private String workflowInstanceId;

    /**
     * 流程步骤id
     */
    @Column
    private String workflowStepId;

    /**
     * 流程步骤名称
     */
    @Column
    private String stepName;

    /**
     * 流程步骤排序号
     */
    @Column
    private Integer stepNum;

    /**
     * 任务执行人
     */
    @Column
    private String executor;

    /**
     * 状态
     */
    @Column
    private Integer status;

    /**
     * 执行结果
     */
    @Column
    private String remark;

    @TransientField
    private String instanceTitle;
    @TransientField
    private String defineFormPath;
    @TransientField
    private String instanceFormId;
    @TransientField
    private String instanceCreateName;
    @TransientField
    private String workflowDefineId;
    @TransientField
    private String executorName;

    public String getStatusStr() {
        return WorkflowInstance.WorkflowInstanceStatusEnum.valueOf(status);
    }

    public String getWorkflowInstanceId() {
        return workflowInstanceId;
    }

    public void setWorkflowInstanceId(String workflowInstanceId) {
        this.workflowInstanceId = workflowInstanceId;
    }

    public String getWorkflowStepId() {
        return workflowStepId;
    }

    public void setWorkflowStepId(String workflowStepId) {
        this.workflowStepId = workflowStepId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getStepName() {
        return stepName;
    }

    public void setStepName(String stepName) {
        this.stepName = stepName;
    }

    public Integer getStepNum() {
        return stepNum;
    }

    public void setStepNum(Integer stepNum) {
        this.stepNum = stepNum;
    }

    public String getInstanceTitle() {
        return instanceTitle;
    }

    public void setInstanceTitle(String instanceTitle) {
        this.instanceTitle = instanceTitle;
    }

    public String getDefineFormPath() {
        return defineFormPath;
    }

    public void setDefineFormPath(String defineFormPath) {
        this.defineFormPath = defineFormPath;
    }

    public String getInstanceFormId() {
        return instanceFormId;
    }

    public void setInstanceFormId(String instanceFormId) {
        this.instanceFormId = instanceFormId;
    }

    public String getInstanceCreateName() {
        return instanceCreateName;
    }

    public void setInstanceCreateName(String instanceCreateName) {
        this.instanceCreateName = instanceCreateName;
    }

    public String getWorkflowDefineId() {
        return workflowDefineId;
    }

    public void setWorkflowDefineId(String workflowDefineId) {
        this.workflowDefineId = workflowDefineId;
    }

    public String getExecutor() {
        return executor;
    }

    public void setExecutor(String executor) {
        this.executor = executor;
    }

    public String getExecutorName() {
        return executorName;
    }

    public void setExecutorName(String executorName) {
        this.executorName = executorName;
    }
}